<#include "/common/layout.ftl">


<@layout >
    <div class="frame-content">
        <div class="table-responsive">
            <div class="table-tool" id="toolbar">
                <button class="btn-primary btn">添加角色</button>
            </div>
            <table id="role-table"></table>
        </div>
    </div>
</@layout>
<@style>

</@style>
<@script>
    <script type="text/javascript">

        HsUtils.initDataTable("#role-table", "/admin/member/get_roles", "#toolbar", [
            {
                field: 'id',
                title: '#'
            },
            {
                field: 'roleName',
                title: '用户名'
            },
            {
                field: 'roleIdentification',
                title: '角色标识'
            },
            {
                field: 'roleAuth.menu.titles',
                title: '权限'
            },
            {
                field: 'action',
                title: '操作',
                formatter: function (row, value, index) {
                    return [HsUtils.buildTableActionBtn("修改", "primary", "/admin/form/preview_form?preview=true"),
                        HsUtils.buildTableActionBtn("删除", "danger", "/admin/form/preview_form")].join('');
                }
            }
        ]);


    </script>




</@script>
